﻿using AutoMapper;
using Traceability.App.Api.Read.Application.Command.Fram;
using Traceability.App.Api.Read.Application.Command.FramCompany;
using Traceability.App.Api.Read.Application.Command.Health;
using Traceability.App.Api.Read.Application.Command.Kill;
using Traceability.App.Api.Read.Application.Command.KillCompany;
using Traceability.App.Api.Read.Application.Command.Trace;
using Traceability.App.Domain;
using Traceability.App.Domain.养殖基本信息表;
using Traceability.App.Domain.屠宰信息表;
using Traceability.App.Domain.新文件夹;

namespace Traceability.App.Api.Read
{
    public class MapperProFile:Profile
    {
        public MapperProFile() 
        { 
            //溯源
            CreateMap<TraceabilityCreateCommand,TraceabilityModel>().ReverseMap();
            CreateMap<DelCommand,TraceabilityModel>().ReverseMap();
            CreateMap<FantCommand,TraceabilityModel>().ReverseMap();
            CreateMap<UpdateCommand, TraceabilityModel>().ReverseMap();


            //养殖
            CreateMap<CreateFramCommand, FarmModel>().ReverseMap();
            CreateMap<UpdateFramCommand, FarmModel>().ReverseMap();

            //保健

            CreateMap<HealthCreateCommand, HealthModel>().ReverseMap();
            CreateMap<HealthDelCommand, HealthModel>().ReverseMap();
            CreateMap<HealthUpdateCommand, HealthModel>().ReverseMap();


            //养殖企业
            CreateMap<FarmCompanyModel, CreateCompanyCommand>().ReverseMap();
            CreateMap<FarmCompanyModel, UpdateCompanyCommand>().ReverseMap();

            //屠宰
            CreateMap<KillCreateCommand, KillInformationModel>().ReverseMap();
            CreateMap<KillUpdateCommand, KillInformationModel>().ReverseMap();

            //屠宰企业添加
            CreateMap<KillCompanyCommand, KillCompanyModel>().ReverseMap();

        }
    }
}
